Skip to content

Conversation

@alex28sh
Copy link
Contributor

…o be present there.

It worked previously, but recent changes in K/Wasm (that'll land in 2.3.20) triggered the following error:

Cannot determine intended module format because both require() and top-level await are present.
If the code is intended to be CommonJS, wrap await in an async function.
If the code is intended to be an ES module, replace require() with import.

This change provides a workaround for the issue.

[1] https://kotlinlang.org/docs/wasm-js-interop.html#kotlin-wasm-and-kotlin-js-interoperability-differences

@fzhinkin fzhinkin self-requested a review November 19, 2025 14:24
@fzhinkin fzhinkin changed the base branch from master to develop November 19, 2025 15:30
@fzhinkin fzhinkin changed the base branch from develop to master November 19, 2025 15:30
@fzhinkin
Copy link
Collaborator

@alex28sh please rebase the branch onto develop.

…o be present there.

It worked previously, but recent changes in K/Wasm (that'll land in 2.3.20) triggered the following error:

> Cannot determine intended module format because both require() and top-level await are present.
> If the code is intended to be CommonJS, wrap await in an async function.
> If the code is intended to be an ES module, replace require() with import.

This change provides a workaround for the issue.

[1] https://kotlinlang.org/docs/wasm-js-interop.html#kotlin-wasm-and-kotlin-js-interoperability-differences
@alex28sh alex28sh force-pushed the fix-loadModule-wasmJs branch from 7d0b39a to 6c89126 Compare November 19, 2025 15:57
@alex28sh alex28sh changed the base branch from master to develop November 19, 2025 15:58
@alex28sh
Copy link
Contributor Author

@alex28sh please rebase the branch onto develop.

@fzhinkin done

Copy link
Collaborator

@fzhinkin fzhinkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alex28sh thank you for fixing the issue!

@fzhinkin fzhinkin merged commit 08e5fd8 into develop Nov 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants